<!-- 基本信息 -->

<template>
  <div>
    <MajorTitle title="基本信息" />

    <EasyRow col3>
      <FormInput label="设备名称" bind="deviceName" required />
      <FormInput label="设备型号" bind="model" />
      <FormInput label="设备序列号" bind="deviceNo" />
    </EasyRow>

    <EasyRow v-if="GETTER.hasIP" col3>
      <FormInput label="IP地址" bind="ipAddress" required />
      <FormInput label="设备端口" bind="defaultPort" required />
      <FormInput label="MAC地址" bind="mac" />
    </EasyRow>

    <EasyRow v-if="GETTER.hasIP" col3>
      <FormInput label="用户名" bind="account" required />
      <FormPassword label="密码" bind="accountPassword" required />
      <FormInput label="设备ID" bind="thirdCode" />
    </EasyRow>

    <EasyRow col3>
      <FormSelect
        label="对接服务"
        bind="connectServiceId, connectServiceName, connectServiceCode"
        :dict="GETTER.filterService"
        required
      />
      <FormTree
        :label="`所在${CORE.MAP.REGION}`"
        bind="areaId, areaName"
        :dict="CORE.REGION.DICT"
        allName
        third2
        required
      />
    </EasyRow>
  </div>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'OurBase',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb()],
}
</script>
